/*
Up = 1
Down = 2
Left = 3
Right = 4
*/
if(self.isScared == 0)
{
    dasSpeed = 2;
}
else
{
    dasSpeed = 3;
}

if(hspeed == 0)
{
    //AI Left
    if(random(3) < 1 && place_free(x - 4, y))// && lastPlace != 4)
    { 
        hspeed = -dasSpeed;
        vspeed = 0;
        lastPlace = 3;
    }
    //AI Right
    if(random(3) < 1 && place_free(x + 4, y))// && lastPlace != 3)
    { 
        hspeed = dasSpeed;
        vspeed = 0;
        lastPlace = 4
    }
}
else
{
    //AI Up
    if(random(3) < 1 && place_free(x, y - 4))// && lastPlace != 2)
    { 
        hspeed = 0;
        vspeed = -dasSpeed;
        lastPlace = 1;
    }
    //AI Down
    if(random(3) < 1 && place_free(x, y + 4))// && lastPlace != 1)
    { 
        hspeed = 0;
        vspeed = dasSpeed;
        lastPlace = 2;
    }
}

